package com.iweb.newa202104.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.iweb.newa202104.util.CommonUtil;
import lombok.Data;

import java.util.Date;


/**
 * @Author: LGZ
 * @Date: 2021/5/11 19:16
 * @Description:
 */
@Data
public class QuestionOutputDTO {
    private String nickname;
    private Integer questionId;
    private Integer userId;
    private Integer categoryId;
    private String categoryName;
    private String questionTitle;
    private String questionContent;
    @JsonIgnore
    private Date questionCreateTime;
    private String createTime;
    private Integer responseId;
    private Integer questionLikeCount;

    public void setQuestionCreateTime(Date questionCreateTime) {
        this.questionCreateTime = questionCreateTime;
        this.createTime = CommonUtil.getTime(questionCreateTime);
    }
}
